package study.chapter03.jdk8.lambda;

@FunctionalInterface
interface MyMessage2{
    void say(String str);
    default void print(){
        System.out.println("this is a print method");
    }
}

public class LambdaDemo3 {
    public static void main(String[] args) {
        MyMessage2 msg = (str) -> {
            System.out.println(str);
        };

        msg.say("hello lambda");
        msg.print();
    }
}
